<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
<script src="base64.min.js"></script>
<title>Untitled Document</title>
<script>
var Gbridge;

function connectWebViewJavascriptBridge(callback) {
	if (window.WebViewJavascriptBridge) {
		callback(WebViewJavascriptBridge);
	} else {
		document.addEventListener('WebViewJavascriptBridgeReady', function() {
			callback(WebViewJavascriptBridge);
		}, false)
	}
}

connectWebViewJavascriptBridge(function(bridge) {
	Gbridge=bridge;
});


function setGoodsParam(){
	var param={
			"productId":"123",
			"type":"car",
			"address":"湖北武汉洪山区软件园",
			"accessories":[{accessoriesProductId:"12"},{accessoriesProductId:"12"}],
			"productClassify":[{
					id:"123",
					name:"名字",
					value:"就放假哦评价为佛牌金额无发票"
				}]
    };
	param=JSON.stringify(param);
	//param=Base64.encode(JSON.stringify(param));
	Gbridge.callHandler('clickAddSpCarAndBuy',param,function(response) {});
}

</script>

</head>

<body>

<input type="button" value="确定商品参数" onClick="setGoodsParam()" />

</body>
</html>
